home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 23 / CU Amiga - Super CD-ROM 23 (June 1998).iso / CreatingGames / Utilities / C / ASAP / inputevent_.h < prev    next >
Encoding:
C/C++ Source or Header  |  2006-09-09  |  2.9 KB  |  81 lines

  1. /*****************************************************************************
  2.  *                                                                           *
  3.  * ASAP - Amiga Software Authoring Platform                                  *
  4.  *                                                                           *
  5.  * Written by Laurie Perrin                                                  *
  6.  *                                                                           *
  7.  * AInputEvent wrapper class                                                 *
  8.  *                                                                           *
  9.  *****************************************************************************/
  10.  
  11. #ifndef ASAP_AInputEvent_H
  12. #define ASAP_AInputEvent_H
  13.  
  14. #include <New.h>
  15.  
  16. extern "C"
  17. {
  18.  #include <CLIB/ALIB_PROTOS.h>
  19.  #include <Proto/Commodities.h>
  20.  #include <Proto/Console.h>
  21.  #include <Proto/Intuition.h>
  22.  #include <Proto/Keymap.h>
  23. }
  24.  
  25. class AInputEvent : public InputEvent
  26. {
  27.  public:
  28.  inline void AddIEvents();
  29. // inline AInputEvent * CDInputHandler(Library * consoleDevice);
  30.  inline void FreeIEvents();
  31.  void operator delete(void *);
  32.  inline void Intuition();
  33.  inline static AInputEvent * InvertString(STRPTR str, KeyMap * km = 0);
  34.  void * operator new(size_t, STRPTR str, KeyMap * km = 0);
  35.  inline WORD MapRawKey(STRPTR buffer, long length, KeyMap * keyMap);
  36.  inline BOOL MatchIX(IX * ix);
  37.  inline LONG RawKeyConvert(STRPTR buffer, long length, KeyMap * keyMap);
  38. };
  39. //----------------------------------------------------------------------------
  40. void AInputEvent::AddIEvents ()
  41. {
  42.  ::AddIEvents(this);
  43. }
  44. /*/----------------------------------------------------------------------------
  45. InputEvent * AInputEvent::CDInputHandler (Library * consoleDevice)
  46. {
  47.  return ::CDInputHandler(this, consoleDevice);
  48. }
  49. *///----------------------------------------------------------------------------
  50. void AInputEvent::FreeIEvents ()
  51. {
  52.  ::FreeIEvents(this);
  53. }
  54. //----------------------------------------------------------------------------
  55. void AInputEvent::Intuition ()
  56. {
  57.  ::Intuition(this);
  58. }
  59. //----------------------------------------------------------------------------
  60. AInputEvent * AInputEvent::InvertString (STRPTR str, KeyMap * km)
  61. {
  62.  return (AInputEvent *) ::InvertString(str, km);
  63. }
  64. //----------------------------------------------------------------------------
  65. WORD AInputEvent::MapRawKey (STRPTR buffer, long length, KeyMap * keyMap)
  66. {
  67.  return ::MapRawKey(this, buffer, length, keyMap);
  68. }
  69. //----------------------------------------------------------------------------
  70. BOOL AInputEvent::MatchIX (IX * ix)
  71. {
  72.  return ::MatchIX(this, ix);
  73. }
  74. //----------------------------------------------------------------------------
  75. LONG AInputEvent::RawKeyConvert (STRPTR buffer, long length, KeyMap * keyMap)
  76. {
  77.  return ::RawKeyConvert(this, buffer, length, keyMap);
  78. }
  79.  
  80. #endif
  81.